package com.legsem.legstar.cci;

import javax.resource.cci.ConnectionSpec;

/**
 * Client can specify mainframe credentials to override the ones defined in host
 * endpoint configuration. It is also possible to set the mainframe to trace the
 * incoming requests for this particular connection.
 * <p/>
 * If credentials are provided as part of this specs, they will be used to
 * select among the free connections in the connection pool. This is because we
 * don't support re-authentication.
 */
public interface LegStarConnectionSpec extends ConnectionSpec {

    /**
     * Get the mainframe user ID (must be a valid RACF user ID).
     * 
     * @return the the mainframe user ID (must be a valid RACF user ID)
     */
    public String getHostUserID();

    /**
     * Set the mainframe user ID (must be a valid RACF user ID).
     * 
     * @param hostUserID the mainframe user ID (must be a valid RACF user ID)
     */
    public void setHostUserID(String hostUserID);

    /**
     * Get the mainframe password (must be a valid RACF password).
     * 
     * @return the the mainframe password (must be a valid RACF password)
     */
    public String getHostPassword();

    /**
     * Set the mainframe password (must be a valid RACF password).
     * 
     * @param hostPassword the mainframe password (must be a valid RACF
     *            password)
     */
    public void setHostPassword(String hostPassword);

    /**
     * Get the mainframe tracing mode.
     * 
     * @return true if mainframe is set to trace
     */
    public boolean isHostTraceMode();

    /**
     * Set the mainframe tracing mode.
     * 
     * @param hostTraceMode true to set the mainframe to trace mode
     */
    public void setHostTraceMode(boolean hostTraceMode);

}
